/*
    Copyright (C) 2010-2011  Anton Dedkov (Antonded). antonded@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef FSNODE_H
#define FSNODE_H

#include "fsfile.h"
#include <list>
#include <string>

using std::list;
using std::string;


class FSNode
{
  
public:
	FSNode (string NodeName = "", FSNode* parent = NULL);
   ~FSNode ();
   
   void AddDir  (string dirname);
   void AddFile (string filename, string dirname);
   
   void DeleteDir  (FSNode* dir);
   void DeleteDir  (string dir);
   
   void DeleteFile (FSFile* file);
   void DeleteFile (string filename, string dirname);
   
   string MakeFsString ();
   void LoadFromString (string str, int position);
 
	
	FSNode* parent_;
  
	list<FSNode*> dirs_;
	list<FSFile*> files_;
	
	string NodeName_;
};

#endif // FSNODE_H 